package com.cx.base.day19_thread;

/**
 * @Author songyahui
 * @Date 2023/7/23 11:23
 * @Description 设置断点后再右键，在弹框选中thread然后done
 * 参考文章https://blog.csdn.net/qq_45481709/article/details/125300427
 */
public class Thread_Debug {
    public static void main(String[] args) {

        Thread thread = new Thread() {
            @Override
            public void run() {
                method1(20);
            }
        };
        thread.setName("多线程DBUG");
        thread.start();
        method1(10);
    }

    private static void method1(int x) {
        int y = x + 1;
        Object o = method2();
        System.out.println(o);
    }

    private static Object method2() {
        Object o = new Object();
        return o;
    }
}